<template>
  <div class="error-page">
    <div class="error-content">
      <div class="error-image">
        <el-icon size="120" color="#ccc">
          <WarningFilled />
        </el-icon>
      </div>
      <h1>404</h1>
      <p>抱歉，页面未找到</p>
      <el-button type="primary" @click="goHome">返回首页</el-button>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'

const router = useRouter()

const goHome = () => {
  router.push('/')
}
</script>

<style scoped>
.error-page {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: var(--el-bg-color-page);
}

.error-content {
  text-align: center;
}

.error-content h1 {
  font-size: 72px;
  color: var(--el-color-primary);
  margin: 20px 0 10px 0;
}

.error-content p {
  font-size: 18px;
  color: var(--el-text-color-secondary);
  margin-bottom: 30px;
}
</style>
